package service.impl;

import java.util.List;

import pojo.Customer;
import service.CustomerManager;
import dao.CustomerDao;
import dao.CustomerDaoFactory;

public class CustomerManagerImpl implements CustomerManager {
	private CustomerDao customerDao;
	
	public CustomerManagerImpl() {
		customerDao = CustomerDaoFactory.getInstance();
	}

	@Override
	public int addCustomer(Customer customer) {
		return customerDao.addCustomer(customer);
	}

	@Override
	public List<Customer> findAllCustomers() {
		return customerDao.findAll();
	}

	@Override
	public int deleteCustomer(Integer id) {
		return customerDao.deleteCustomer(id);
	}

	@Override
	public int updateCustomer(Customer customer) {
		return customerDao.updateCustomer(customer);
	}

	@Override
	public Customer loadCustomer(Integer id) {
		return customerDao.loadCustomer(id);
	}

}
